package com.diandian.backend.dingding.exchange.param;

import com.diandian.base.boot.starter.exception.DefaultException;

import java.io.Serializable;

public class DingdingMessageSendParam implements Serializable {

    private String mobile;
    private String content;
    private String robotAccessToken;
    private String robotSecret;

    public void check(){
        if(content == null || "".equals(content)){
            throw new DefaultException("消息内容不能为空");
        }
        if(robotAccessToken == null || "".equals(robotAccessToken)){
            throw new DefaultException("通知token不能为空");
        }
        if(robotSecret == null || "".equals(robotSecret)){
            throw new DefaultException("通知secret不能为空");
        }
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getRobotAccessToken() {
        return robotAccessToken;
    }

    public void setRobotAccessToken(String robotAccessToken) {
        this.robotAccessToken = robotAccessToken;
    }

    public String getRobotSecret() {
        return robotSecret;
    }

    public void setRobotSecret(String robotSecret) {
        this.robotSecret = robotSecret;
    }
}
